<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::post('goods/{id}', 'AdminController@getGoods');
Route::post('admin', 'AdminController@index');

Route::middleware(['auth:api'])->group(function () {
    Route::group([
        'namespace' => 'Admin',
        'prefix' => 'admin'
    ], function ($router) {
        Route::get('export', 'ExcelController@export');
        Route::post('import', 'ExcelController@import');
        Route::post('data/index', 'DataController@index');
        Route::get('wages/index', 'WagesController@index');
        Route::post('wages/updateWages', 'WagesController@updateWages');

        Route::get('wages/deleteDataById', 'WagesController@deleteDataById');
        Route::get('wages/deleteAllCordByUploadId', 'WagesController@deleteAllCordByUploadId');

        Route::get('wages/getUploadCord', 'WagesController@getUploadCord');

        Route::get('wages/getCompanyList', 'WagesController@getCompanyList');
        Route::post('wages/addCompany', 'WagesController@addCompany');
        Route::post('wages/updateCompany', 'WagesController@updateCompany');


    });

});


Route::group([
    'namespace' => 'Admin',
    'prefix' => 'admin'
], function ($router) {
    Route::get('wages/getWagesByMobile', 'WagesController@getWagesByMobile');

    Route::get('wages/getDetailById', 'WagesController@getDetailById');

    //data相关
    Route::post('data/statistics', 'DataController@statistics');
    Route::post('data/select', 'DataController@select');
    Route::post('data/getAccessToken', 'DataController@getAccessToken');
    Route::post('data/add', 'DataController@create');
    Route::post('data/info', 'DataController@getInfo');

});



